<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
        <meta content="telephone=no" name="format-detection" />
        <title>分配银票</title>
        <link href="{{asset('/mobile/css/style.css')}}" rel="stylesheet" type="text/css">
    </head>
    <style type="text/css">
        body{
            background-color: #F1F1F1;
        }
        input{
            border: none;
            outline: none;
        }
        .mine{
            box-sizing: border-box;
            padding: 0.8rem 1rem;
            overflow: hidden;
            margin-bottom: 10px;
            background-color: #FFFFFF;
        }
        .mine-left{
            float: left;
        }
        .mine-right{
            float: right;
            color: #D74B2D;
        }
        .mine-icon{
            float: left;
            height: 1rem;
            margin-right: 5px;
        }
        .inp-wrap{
            background-color: #FFFFFF;
            margin: 25px 0;
        }
        .inp{
            width: 80%;
            padding: 15px 0;
            margin-left: 15px;
            font-size: 1.1rem;
        }
        .btn-big{
            text-align: center;
            background-color: #D9543B;
            border-radius: 5px;
            font-size: 1.1rem;
            padding: 0.7rem 0;
            color: #F9EAE7;
            width: 90%;
            margin: 0 auto;
        }
    </style>
    <body>
        <form method="POST" action="">
            {{csrf_field()}}
            <div class="mine">
                <img class="mine-icon" src="{{asset('/imgs/yinpiao.png')}}"/>
                <div class="mine-left">我的银票</div>
                <div class="mine-right">{{$my->user()->gems}}</div>
            </div>
            <div class="inp-wrap">
                <input class="inp" name="gems" type="number" id="ypNum" placeholder="请输入要分配的银票数量" />
            </div>
            <div class="btn-big" id="go">分配</div>
        </form>
    <script type="text/javascript" src="{{asset('/mobile/js/jquery-1.8.3.min.js')}}"></script>
    <script type="text/javascript">
        $('#go').click(function() {
            var ypNum = $('#ypNum').val()
            if (!ypNum) {
                return false;
            } else {
                $(this).parents('form').submit();
            }
        })
    </script>
    </body>
</html>
